package com.example.shopsystem.dao;

import com.example.shopsystem.entity.*;
import com.example.shopsystem.entity.vo.PurchaseOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper {
    List<OrderDeail> queryOrderDeail(@Param("OrderId") String OrderId);

    List<Order> queryOrder(@Param("beginTime") String beginTime, @Param("dieTime") String dieTime);

    List<Order> queryUserOrder(@Param("userId") String userId);

    int insert_return(@Param("returngood") ReturnGood returnGood);

    Boolean insertOrder(@Param("order") Order order);

    Boolean updateOrder(@Param("order") Order order);

    Order queryOneOrder(@Param("orderId") Integer orderId);

    List<PurchaseOrder> PrintPurchaseOrder(@Param("beginTime") String beginTime, @Param("dieTime") String dieTime);

    Boolean insertOrder_detailed(@Param("shopCar") ShopCar shopCar, @Param("orderId") Integer orderId);

    List<ReturnGood> queryReturnGood(@Param("beginTime") String beginTime, @Param("dieTime") String dieTime, @Param("state") int state);

    List<ReturnDetail> queryReturnDetail(@Param("returnId") int returnId);

    Boolean insert_return_detailed(@Param("rg_id") Integer rg_id, @Param("go_id") String go_id, @Param("good_number") int good_number, @Param("now_money") Double now_money);
}
